package com.fooddiary.model;

import java.io.Serializable;

import javax.persistence.AttributeOverride;
import javax.persistence.AttributeOverrides;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

import com.fooddiary.model.entity.BaseEntity;

/**
 * 
 * @author Created by andrey.kuznetsov <br>
 * @author Last modified by $Author$ <br>
 * @author Last modified on $Date$ at revision $Revision$ <br>
 */
@Entity
@Table(name = "eating_type")
@AttributeOverrides({
	@AttributeOverride(name="id", column=@Column(name="id")),
	@AttributeOverride(name="enabled", column=@Column(name="enabled"))
})
public class EatingType extends BaseEntity implements Serializable{

	private static final long serialVersionUID = -3934680672366991665L;

	@Column(name = "name", unique = true, nullable = false, insertable = false, updatable = false, length = 20)
	private String name;
	
	@Column(name = "display_name", unique = true, nullable = false, insertable = false, updatable = false, length = 20)
	private String displayName;

	@Column(name = "eating_order", unique = true, nullable = true, insertable = true, updatable = true)
	private Short eatingOrder;
	
	/**
	 * Returns unique name of eating type <br>
	 * @return {@link String};
	 */
	public String getName() {
		return name;
	}

	/**
	 * Sets unique name of eating type <br>
	 * @param p_name - {@link String};
	 */
	public void setName(String p_name) {
		name = p_name;
	}

	/**
	 * Returns display name of eating type <br>
	 * @return {@link String};
	 */
	public String getDisplayName() {
		return displayName;
	}

	/**
	 * Sets display name of eating type <br>
	 * @param p_displayName - {@link String};
	 */
	public void setDisplayName(String p_displayName) {
		displayName = p_displayName;
	}

	/**
	 * Returns order of eating type <br>
	 * @return {@link Short};
	 */
	public Short getEatingOrder() {
		return eatingOrder;
	}

	/**
	 * Sets order of eating type <br>
	 * @param p_order - {@link Short};
	 */
	public void setEatingOrder(Short p_eatingOrder) {
		eatingOrder = p_eatingOrder;
	}
	
	
}
